package com.booza.model;

public class CreditCardDetails
{
	private int id;
	private String cardNumber;
	private String cardName;
	private int expiryMonth;
	private int expiryYear;
	private Account account;
	private String cardType;

	/**
	 * @return the id
	 */
	public int getId()
	{
		return id;
	}

	/**
	 * @param id
	 *          the id to set
	 */
	public void setId(int id)
	{
		this.id = id;
	}

	/**
	 * @return the cardNumber
	 */
	public String getCardNumber()
	{
		return cardNumber;
	}

	/**
	 * @param cardNumber
	 *          the cardNumber to set
	 */
	public void setCardNumber(String cardNumber)
	{
		this.cardNumber = cardNumber;
	}

	/**
	 * @return the cardName
	 */
	public String getCardName()
	{
		return cardName;
	}

	/**
	 * @param cardName
	 *          the cardName to set
	 */
	public void setCardName(String cardName)
	{
		this.cardName = cardName;
	}

	/**
	 * @return the expiryMonth
	 */
	public int getExpiryMonth()
	{
		return expiryMonth;
	}

	/**
	 * @param expiryMonth
	 *          the expiryMonth to set
	 */
	public void setExpiryMonth(int expiryMonth)
	{
		this.expiryMonth = expiryMonth;
	}

	/**
	 * @return the expiryYear
	 */
	public int getExpiryYear()
	{
		return expiryYear;
	}

	/**
	 * @param expiryYear
	 *          the expiryYear to set
	 */
	public void setExpiryYear(int expiryYear)
	{
		this.expiryYear = expiryYear;
	}

	/**
	 * @return the account
	 */
	public Account getAccount()
	{
		return account;
	}

	/**
	 * @param account
	 *          the account to set
	 */
	public void setAccount(Account account)
	{
		this.account = account;
	}

	/**
	 * @return the cardType
	 */
	public String getCardType()
	{
		return cardType;
	}

	/**
	 * @param cardType
	 *          the cardType to set
	 */
	public void setCardType(String cardType)
	{
		this.cardType = cardType;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode()
	{
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		return result;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj)
	{
		if (this == obj) return true;
		if (obj == null) return false;
		if (getClass() != obj.getClass()) return false;
		CreditCardDetails other = (CreditCardDetails) obj;
		if (id != other.id) return false;
		return true;
	}
}
